﻿using System.Collections.Generic;
using NHibernate;

namespace Laugh.Data.DatabaseCfg
{
    public interface ISessionFactoryHolder
    {
        ISessionFactoryHolder Register(string key, ISessionFactory sessionFactory, NHibernate.Cfg.Configuration configuration, IInterceptor interceptor = null);
        ISessionFactoryHolder RegisterDefault(ISessionFactory sessionFactory, NHibernate.Cfg.Configuration configuration, IInterceptor interceptor = null);
        ISessionFactory GetSessionFactory(string key = null);
        //NHibernate.Cfg.Configuration GetConfiguration(string key = null);
        List<ISessionFactory> SessionFactories { get; }
        ISession OpenSession(ISessionFactory sessionFactory);
    }
}
